package com.jrx.anytxn.accounting.job.glinterfaceInvestor.step;

import com.jrx.anytxn.investor.entity.TlGlInterfaceInvestorInfo;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisPagingItemReader;

import java.util.Date;
import java.util.HashMap;

public class GlInterfaceInvestorReader extends MyBatisPagingItemReader<TlGlInterfaceInvestorInfo> {


    public GlInterfaceInvestorReader(Date businessDate, SqlSessionFactory sqlSessionFactory, Integer pagesize) {

        setSaveState(false);
        setPageSize(pagesize);
        setSqlSessionFactory(sqlSessionFactory);
        setQueryId("com.jrx.anytxn.investor.mapper.ext.ExtTlGlInterfaceInvestorInfoMapper.getByDateAndOrgId");
        setParameterValues(new HashMap<String, Object>() {
            {
                put("date",businessDate);
            }
        });
    }
}
